let baseUrl = 'http://localhost:8000/produce'
function getproduce(keyword){
    return new Promise((resolve,reject)=>{
        $.get(`${baseUrl}?keyword=${keyword}`,data=>{
         
             resolve(data);
        })
    })
}

function delproduce(id){
    console.log(id);
    return new Promise((resolve,reject)=>{
    $.ajax({
        url:`${baseUrl}/${id}`,
        type:'delete',
        success:data=>{
            console.log(data);
            resolve(data);
        }
    })
})
}

